interface SquarConfig{
    width?:string;
    height?:number
}

interface CompareTo{
    (a:number,b:number):number
    task();
}

let a = 10;
let b = 20;

let cpt : CompareTo = function (a:number,b:number):number{
    if(a>b){
        return a;
    }else{
        return b;
    }
}

alert(cpt(a,b))


let passcode = "secret passcode";

class Employee {
    private _fullName: string;

    get fullName(): string {
        return this._fullName;
    }

    set fullName(newName: string) {
        if (passcode && passcode == "secret passcode") {
            this._fullName = newName;
        }
        else {
            console.log("Error: Unauthorized update of employee!");
        }
    }
}

let employee = new Employee();
employee.fullName = "Bob Smith";
if (employee.fullName) {
    alert(employee.fullName);
}



